<?php

class JsonController extends AppController {
	function beforeFilter() {
		parent::beforeFilter();
		if($this->RequestHandler->isAjax()){
			$this->layout = 'json';
			$this->view="Json";
		}else{
			if(isset($this->params['prefix'])&&$this->params['prefix']=="admin"){
				$this->layout="scaffold";
			}else{
				$this->layout="default";
			}
		}
	}
};

?>